Release 10.1A: OpenEdge Application Server:
Developing AppServer Applications
Mixing synchronous and asynchronous requests
If you attempt to execute a synchronous request on an AppServer connection with outstanding asynchronous requests, OpenEdge raises the
ERRORcondition. You can determine if there are any outstanding asynchronous requests for an AppServer by checking the value of theASYNC-REQUEST-COUNTattribute of the appropriate server handle.You can also ensure that all asynchronous requests for a given server handle have completed execution by the way you set up your event management in the client. Specify the
PROCEDURE-COMPLETEevent in theWAIT-FORstatement for the asynchronous request handle that corresponds to the last asynchronous request submitted before theWAIT-FORstatement is executed. For example, assume that you submit three asynchronous requests for some server handle and that the asynchronous request handles are returned inHANDLEvariableshdl1,hdl2, andhdl3. To ensure that there are no outstanding asynchronous requests before submitting a synchronous request, execute theWAIT-FORstatement specifying thePROCEDURE-COMPLETEevent forhdl3.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |